package puzzle.common.loader;

import java.io.IOException;
import java.io.Reader;

import tomoto.io.StreamUtil;
import tomoto.net.QueryStringUtil;

public class NfpParser {
	public static String extractData(Reader r) throws IOException {
		StringBuilder sb = new StringBuilder();
		StreamUtil.copy(sb, r);
		return extractData(sb.toString());
	}
	
	public static String extractData(String data) {
		QueryStringUtil.Parser qsp = new QueryStringUtil.Parser();
		qsp.parse(data);
		return qsp.getParam("dataQuestion");
	}
}
